﻿@model PagedList.StaticPagedList<Guan.CMS.Web.ViewModels.Product.ProductViewModel>
@using PagedList.Mvc
@section Styles
{
    <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/PagedList.css")" />
}
@Html.Action("RecommondProducts")
<div class="content_resize fn-clear">
    <div class="mainbar">
        <h2>@ViewBag.ColumnName</h2>
        <div class="productsList fn-clear">
            @if (Model.Any())
            {
                foreach (var pro in Model)
                {
                    <div class="productItem">
                        <div class="pic">
                            <div class="floater"></div>
                            <a href="@Url.Action("Detail", new {id = pro.Id})" title="@pro.ShortDescription" target="_blank"><img src="@Url.Content(string.IsNullOrWhiteSpace(pro.ImageUrl) ? "~/Content/Images/nopic.jpg" : pro.ImageUrl)" alt="@pro.Name" width="150" height="120" /></a>
                        </div>
                        <a href="@Url.Action("Detail", new {id = pro.Id})" title="@pro.ShortDescription" target="_blank" class="name">@pro.Name</a>
                    </div>
                }
            }
            else
            {
                <p>此分类下暂无产品。</p>
            }
        </div>
        <div class="paging">
            @Html.PagedListPager(Model,page => Url.Action("Index",new{page,category=Request["category"]}))
        </div>
    </div>
    <div class="sidebar">
        @Html.Action("Category")
        @Html.Partial("_RightSliderContact")
    </div>
</div>
@section Scripts
{
    @Scripts.Render("~/bundles/roll")
    <script type="text/javascript">
        var scrollPic_01 = new ScrollPic();
        scrollPic_01.scrollContId = "ScrollBox"; //内容容器ID
        scrollPic_01.arrLeftId = "ReLeftBtn"; //左箭头ID
        scrollPic_01.arrRightId = "ReRightBtn"; //右箭头ID
        scrollPic_01.frameWidth = 840; //显示框宽度
        scrollPic_01.pageWidth = 168; //翻页宽度
        scrollPic_01.speed = 10; //移动速度(单位毫秒，越小越快)
        scrollPic_01.space = 5; //每次移动像素(单位px，越大越快)
        scrollPic_01.autoPlay = true; //自动播放
        scrollPic_01.autoPlayTime = 3; //自动播放间隔时间(秒)
        scrollPic_01.initialize(); //初始化
    </script>
}
